using System.Runtime;
using Godot;

class BlackBoardUtil
{
    public static Variant GetValue(Node blackNode, string key)
    {
        if (blackNode.HasMethod("get_value"))
        {
            return blackNode.Call("get_value", key);
        }
        else
        {
            return "";
        }

    }

    public static void SetValue(Node blackNode, string key, Variant value)
    {
        if (blackNode.HasMethod("set_value"))
        {
            blackNode.Call("set_value", key, value);
        }
    }

    public static bool HasValue(Node blackNode, string key)
    {
        if (blackNode.HasMethod("has_value"))
        {
            return (bool)blackNode.Call("has_value", key);
        }
        return false;
    }

    public static void EraseValue(Node blackNode, string key)
    {
        if (blackNode.HasMethod("erase_value"))
        {
            blackNode.Call("erase_value", key);
        }
    }


}